package br.cin.ufpe.corba.interfacerepository;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class InterfaceDef implements Serializable {
	
	private static final long serialVersionUID = -3892832915032550729L;
	
	private String repositoryId;
	private Set<String> base_interfaces;
	
	public InterfaceDef(String repositoryId) {
		this.repositoryId = repositoryId;
		this.base_interfaces = new HashSet<String>();
	}
	
	public boolean is_a(String repositoryId) {
		if (this.repositoryId.equals(repositoryId)) {
			return true;
		}
		
		return base_interfaces.contains(repositoryId);
	}

	public String getRepositoryId() {
		return repositoryId;
	}

	public void setRepositoryId(String repositoryId) {
		this.repositoryId = repositoryId;
	}

	public Set<String> getBaseInterfaces() {
		return base_interfaces;
	}

	public void setBaseInterfaces(Set<String> base_interfaces) {
		this.base_interfaces = base_interfaces;
	}	
	
}
